package com.liu.community.mapper;/*
 *@Author:Liu Xing-zhi
 *Description:
 *Date:Crated in 15:20 2021/11/12
 */

import com.liu.community.pojor.Blog;
import com.liu.community.pojor.Question;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface BlogMapper {

    void createBlog(Blog blog);

    Integer updateBlog(Blog blog);

    Blog queryBlogById(@Param("id") Integer id);

    Integer queryDataTotalCountByUserId(@Param("userId") Integer userId);

    List<Blog> queryAllBlogById(@Param("userId")Integer userId, @Param("begin")Integer begin,@Param("pageSize")Integer pageSize);

    List<Blog> queryRelated(Blog blog);

    void queryBlogById();

    Integer updateCommentCount(@Param("id") Integer id,@Param("commentCount") Integer commentCount);

    void updateViewCount(Blog blog);

}
